function [ cname ccode ctype ] = GetConditionByName( name )
%GETCONDITIONBYNAME Retrieve the entire conditionrow by name

global Database;

columnCode = strcmp(Database.conditions_header, 'Code');
columnName = strcmp(Database.conditions_header, 'Name');
columnType = strcmp(Database.conditions_header, 'Type');

names = sort(unique({Database.conditions{:,columnName}}));
cname = Like(names, name, true);

SelectedRow = strcmp(Database.conditions(:,columnName), cname);
if sum(SelectedRow) ~= 1; error('Problem with resolving the conditions.'); end;
ccode = Database.conditions{SelectedRow, columnCode};
ctype = Database.conditions{SelectedRow, columnType};

end

% disp('Creating ''conditions'' datatable..')
% Database.conditions_header = {'Name', 'Code'};
% Database.conditions = {...
%     'Sphere Ambiguous Response','SPAR';...
%     'Sphere Unambiguous Response','SPUR';...
